<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/form/page-fieldset-template.xhtml">
	<ui:param name="editBodyViewBean" value="#{commonContentViewBean}" />
	<ui:param name="editBodyParentViewBean" value="#{commonContentViewBean.parent}" />
	<ui:param name="compId" value="#{editBodyViewBean.id}" />
	<ui:param name="compTitle" value="编辑板块" />	
	<ui:param name="compToggleable" value="true" />
	<ui:define name="compContent">
	<center>
	<h:panelGrid columns="2">
		<h:panelGroup style="float: right;">
	     	<h:outputText value="板块名称："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:inputText id="bodyName" value="#{editBodyViewBean.bodyEntity.bodyName}"
				style="width: 180px;" />
		</h:panelGroup>
		<h:panelGroup style="float: right;">
	     	<h:outputText value="排序："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:inputText id="bodySort" value="#{editBodyViewBean.bodyEntity.sort}"
				style="width: 180px;" />
		</h:panelGroup>
		<h:panelGroup style="float: right;">
	     	<h:outputText value="所属分类："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:selectOneMenu id="typeName" value="#{editBodyViewBean.typeId}" style="width: 176px;" required="true">
					<f:selectItems value="#{editBodyViewBean.queryTypeSelectItemList}" />				
			</h:selectOneMenu>
		</h:panelGroup>
		<h:panelGroup style="float: right;">
	     	<h:outputText value="描述："/>
	 	</h:panelGroup>
		<h:panelGroup style="float: left;">
			<h:inputTextarea id="bodyDesc" value="#{editBodyViewBean.bodyEntity.bodyDesc}"
				style="width:300px;height:100px;" />
		</h:panelGroup>
	</h:panelGrid>
	</center>
	</ui:define>
	<ui:define name="compButtons">
        <p:commandButton actionListener="#{bbsManageAction.editBodyAction}"
			title="保存" 
			onstart="this.disabled=true"
			onclick="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/add.png" 
			value="保存" 
			style="margin:5px;"
			update="#{editBodyParentViewBean.id}_form">
		    <h:inputHidden  value="#{editBodyViewBean.id}"/>
		</p:commandButton>
		
		<p:commandButton 
		     title="关闭" 
		     image="./img/icons/cancel.png"		
		     onclick="#{commonContentViewBean.id}_dialog.hide();" 
		     type="button" 		
		     value="关闭" 
		     style="margin:5px;">
		</p:commandButton>
	</ui:define>
</ui:composition>
